<?php


class Sherpa_Model_DbTable_Store_Row extends WSB_Db_Row
{

	public function init()
	{
		$this->_formConfigPath = WSB_MODULES_PATH . 'sherpa/models/DbTable/Store/form.config';
	}

	/**
	 * @return string
	 */
	public function getTitle()
	{
		return $this->name;
	}

    public function getAddress()
    {
        $str = "";
        if(!empty($this->address)) {
            $str .= $this->address . "|";
        }
        if(!empty($this->addition)) {
            $str .= $this->addition . "|";
        }
        if(!empty($this->country)) {
            if($this->country != 'CH') {
                $str .= $this->country . ' - ';
            }
        }
        if(!empty($this->country) || !empty($this->city)) {
            $str .= $this->zip . ' ' . $this->city . "|";
        }
        if(!empty($this->phone)) {
            $str .= 'Tel: ' . $this->phone . "|";
        }
        if(!empty($this->fax)) {
            $str .= 'Fax: ' . $this->fax . "|";
        }
        return $str;
    }

}
